package org.jeecg.modules.pacs.handle;


import org.mybatis.spring.MyBatisSystemException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dao.RecoverableDataAccessException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class ExceptionHandle {
    private final static Logger logger = LoggerFactory.getLogger(Exception.class);

    @ExceptionHandler
    @ResponseBody
    public Request handle(Exception e) {

        logger.info("系统错误{}", e);
        return RequestUtil.lose(ResultEnum.UNKONW_ERROR);
    }


}
